﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TopWinCMS.MobileUI.Models;
using TopWinCMS.BLL;
using TopWinCMS.Model;
namespace BootstrapMvcSample.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            IndexModel model = new IndexModel();
            model.TopClasses = ClassManage.GetChildren(0);

            return View(model);
        }
        public ActionResult Class(int ClassID, int PageNo = 1)
        {
            ClassModel model = new ClassModel();
            model.TopClasses = ClassManage.GetChildren(0);
            var cores = new CoreManage().ClassPageBindList(ClassID, string.Empty, new PagingParam() { PageNo = PageNo,PageSize =10 });
            model.Cores = cores;
            return View("Class", model);
        }
    }
}
